<%--
    Document   : Statistiche
    Created on : 15-dic-2011, 17.56.45
    Author     : guybrush
--%>

<%@page import="java.util.Calendar"%>
<%@page import="beans.util.ExtendedDataTableBean"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j"%>
<%@taglib prefix="rich" uri="http://richfaces.org/rich"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title><h:outputText value="#{msg.statistics} - #{msg.medic}: #{extendedDataTableBean.username} (#{extendedDataTableBean.nome} #{extendedDataTableBean.cognome})" /></title>
            <link href="<% out.print(request.getContextPath()); %>/resources/css/position.css" rel="stylesheet" type="text/css" />
            <% ExtendedDataTableBean med = ((ExtendedDataTableBean) session.getAttribute("extendedDataTableBean")); med.invalidPats(); %>
        </head>
        <body>
            <jsp:include page="/pages/fragments/header.jsp" />
            <jsp:include page="/pages/fragments/medicMenu.jsp" />
            
            <section>
                <a4j:form id="statistic">
                    <rich:panel header="#{msg.statistics} - #{msg.statistic_header}" style="width: 670px">
                        <rich:dataTable value="#{extendedDataTableBean.vaccCount}" var="res" id="table"
                                                    width="650px" >
                            <rich:column>
                                <f:facet name="header">
                                    <h:outputText value="#{msg.vaccinations}"/>
                                </f:facet>
                                <h:outputText value="#{res}"/>
                            </rich:column>
                            <rich:column>
                                <f:facet name="header">
                                    <h:outputText value="#{msg.prog_exams}"/>
                                </f:facet>
                                <h:outputText value="#{extendedDataTableBean.progExamCount}"/>
                            </rich:column>
                            <rich:column>
                                <f:facet name="header">
                                    <h:outputText value="#{msg.voluntaries}"/>
                                </f:facet>
                                <h:outputText value="#{extendedDataTableBean.volExamCount}"/>
                            </rich:column>
                        </rich:dataTable>
                        <rich:separator height="20px" />
                        <rich:dataList var="ex" value="#{extendedDataTableBean.allExam}" title="#{msg.date_hour}:">
                            <h:outputText value="#{ex.scadenza}"/><br/>
                        </rich:dataList>
                    </rich:panel>
                </a4j:form>
            </section>
        </body>
    </html>
</f:view>